#include "StdAfx.h"
#include "LogCtrl.h"


CLogCtrl::CLogCtrl(void)
{
	m_String.Preallocate(1024*1024);
}


CLogCtrl::~CLogCtrl(void)
{
}

void CLogCtrl::OutPut(LPCTSTR lpStr)
{

	m_String += lpStr;
	SetWindowTextW(m_String);
	SetSel(m_String.GetLength(),m_String.GetLength());
	//this->GetScrollInfo(SB_VERT, &si);
	//this->SetScrollPos(SB_VERT,si.nMax + 500);
}

void CLogCtrl::Reset()
{
	m_String = _T(" ");
	SetWindowTextW(m_String);
}